# Maintainer:
pkgname=jalv
pkgver=1.6.8
pkgrel=1
pkgdesc="Simple but fully featured LV2 host for Jack"
url="https://drobilla.net/software/jalv.html"
arch="all"
license="ISC"
makedepends="
	gtk+3.0-dev
	jack-dev
	lilv-dev
	lv2-dev
	meson
	serd-dev
	sord-dev
	sratom-dev
	suil-dev
	"
subpackages="$pkgname-gtk $pkgname-doc"
source="https://download.drobilla.net/jalv-$pkgver.tar.xz"

build() {
	abuild-meson \
		-Db_lto=true \
		-Dcxx=enabled \
		-Dgtk2=disabled \
		-Dgtk3=enabled \
		-Dportaudio=disabled \
		-Dqt5=disabled \
		-Dsuil=enabled \
		-Dtests="$(want_check && echo enabled || echo disabled)" \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

gtk() {
	pkgdesc="$pkgdesc (GTK3 UI)"

	amove \
		usr/bin/jalv.gtk3 \
		usr/share/applications/jalv.desktop
}

sha512sums="
a3361239cbff8b02a0d46bb06480d727ad45abe1856ad4cec1a1299851392be04fdfa58ba6803ed2a446eb8964c4a44191733b53fe8529c65155b0221323428f  jalv-1.6.8.tar.xz
"
